<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script src="${ctxStatic}/js/utils/Jutils.js"></script>
<script src="${ctxStatic}/layer/layer.js"></script>
	<script type="text/javascript">
		function page(n,s){
			$("#pageNoL").val(n);
			$("#pageSizeL").val(s);
			reloadloan1();
        	return false;
        }
		function  reloadloan1() {
			var param=$("#searchForm").form2Json();
			$("#loanList").load("${ctx}/sys/member/member/loanList",param);
		}
		$(function () {
			$("#query").bind("click",function () {
				reloadloan1();
			});
		});
	</script>
	<form id="searchForm" >
		<input id="pageNoL" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSizeL" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>贷款产品分类：</label>
				<sys:treeselect id="parent" name="typeId" cssStyle="width:100px;height:30px;" value="" labelName="parent.name" labelValue=""
								title="选择贷款产品分类" url="/sys/loan/loanType/treeData"  cssClass="" allowClear="true"/>

			</li>
			<li class="clearfix"></li>
		</ul>
	</form>
<button id="query" class="btn btn-primary" >查询</button>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>产品名称</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:if test="${empty page.list}"><tr><td colspan="2">暂无数据</td></tr></c:if>
		<c:forEach items="${page.list}" var="loan">
			<tr>
				<td>
					<a href="javascript:void(0)" class="">${loan.name}
					<span style="color: red">(所需资料：<c:forEach var="materialType" items="${loan.materialTypes}">${materialType.name}&nbsp;</c:forEach>
						<c:if test="${fn:length(loan.materialTypes)<1}">暂无</c:if>  )</span>
				</a>
				</td>
				<td><shiro:hasPermission name="sys:member:member:edit"><a  href="javascript:void(0)" style="color: #00A6C7" class="add-apply" data-name="${loan.name}" data-id="${loan.id}" >选择</a></shiro:hasPermission></td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
